#include <bits/stdc++.h>
// 2025/01/21
// tag: 
// Author: Zhang Muen
using namespace std;

class UF
{
public:
    vector<int> parents;
    int cnt;

    UF(int n)
    {
        cnt = n;
        for (int i = 0; i <= n; i++)
            parents.push_back(i);
    };

    int find(int i)
    {
        if (parents[i] != i)
            return parents[i] = find(parents[i]);
        return parents[i];
    }

    void un(int i, int j)
    {
        int ri = find(i), rj = find(j);
        if (ri == rj)
            return;
        parents[ri] = rj;
        cnt--;
    }

    int count()
    {
        return cnt;
    }

    bool connected(int p, int q)
    {
        return find(p) == find(q);
    }
};

int s, p, pos[501][2];

bool check(double dis){
    UF uf(p);
    for (int i = 1; i <= p; i++)
        for (int j = i + 1; j <= p; j++)
            if (pow(pos[i][0] - pos[j][0], 2) + pow(pos[i][1] - pos[j][1], 2) <= dis * dis)
                uf.un(i, j);
    return uf.count() <= s || uf.count() == 1;
}

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cin >> s >> p;
    for (int i = 1; i <= p; i++)
        cin >> pos[i][0] >> pos[i][1];
    double left = 0, right = 15000, mid = 0;
    while (right - left > 0.00001) // 使用 right - left > 0.00001 来判断是否继续循环
    {
        mid = (right + left) / 2;
        if (check(mid))
            right = mid;
        else
            left = mid;
    }

    cout << fixed << setprecision(2) << left;
    return 0;
}